package il.ac.braude.sona.constants;

/**
 * This class contains definitions for request statuses i.e. only constants are included.
 * No methods, constructors or attributes are included.
 *  
 * @author Ofek Ron
 * @author Avihay Avitan
 * @author Nitzan Inbar
 * @author Sasha Rozenthal
 */

public class TestingParamKit {

	public int flag=0;
	public boolean mailSent=false;
	public boolean TestMode=false;
	
	private static TestingParamKit instance=null;
	private TestingParamKit(){
	}

	public static TestingParamKit getTestingKit(){
		if (instance==null)
		 instance=new TestingParamKit();
		return instance;
	}
	public void notifyTester(){
		
		synchronized(this) {
			flag=1;
			this.notify();
		}
	}
	
	public  void waitForNotify(){
		while (flag==0) {
			synchronized(this) {
				try {
					this.wait();
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			} 
		}
		flag=0;
	}

	public void startTestMode() {
		TestMode=true;
	}

	
}
